package com.ctshk.common.enums;

/**
 * 套票单项枚举
 *
 * @author Eric 2021-04-21
 */
public enum SeasonIndividualType {

    AIR("1", "机票"),
    SHIP("2", "船票"),
    HOTEL("3", "酒店"),
    BUS("4", "巴士"),
    TRAIN("5", "火车票"),
    SCENIC("6", "景点门票"),
    LOCALFUN("7", "当地玩乐"),
    COMMODITY("8", "商品");

    private String key;
    private String name;

    SeasonIndividualType(String key, String name) {
        this.key = key;
        this.name = name;
    }

    public static SeasonIndividualType getEnumType(String key) {
        for (SeasonIndividualType each : SeasonIndividualType.values()) {
            if (each.getKey().equals(key)) {
                return each;
            }
        }
        return null;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
